package com.demo.chapter14advcfunction.lazy;

public class Test {

	public static LazyList<Integer> from(int n){
		return new LazyList<Integer>(n, () -> from(n + 1));
	}

	public static void main(String[] args) {
		System.out.println(from(2).head());
		System.out.println(from(2).tail().head());
		System.out.println(from(2).tail().tail().head());
	}

}
